"""open 打开文件 finally 文件关闭"""
try:
    data_file = open("E:/ssss.txt")
    print(data_file.readline(), end='')
except IOError:
    print("IO error")
finally:
    if 'data' in locals():
        data_file.close()
